The invention relates in general to the field of computer software optimization and, more particularly, to run-time alterations in operating system resource allocation data. Specifically, the invention describes a method for dynamically altering operating system kernel resource control tables without the need to shut-down and reboot the computer system to invoke the changes.
An application executing under the control of, for example, the Unix operating system requests the use or allocation of resources controlled by the kernel through a mechanism known as a system call. The system call technique provides a standard interface in all currently available Unix variants and is essentially a branch table indexed by the function being requested. See FIG. 1. A non-exhaustive set of system call examples include open a file, close a file, allocate memory, perform an input-output (I/O) operation, and allocate or use an interprocess communication resource such as a message queue, semaphore, or shared memory.
As part of the processing of a system call, special kernel program code switches the state of the operating environment from that of the application (commonly referred to as user mode, problem state, or protected mode) to a state required by the kernel to accomplish its control tasks (commonly referred to as kernel mode, supervisor state, or privileged mode). It then indexes into the branch table (commonly called a sysent table 100), extracts the address 105 of the routine to process the requested function, and calls the routine 120 at that address to perform the requested function. When the kernel function 120 has completed its processing, it returns its result(s) and control back to the operating environment (e.g., user or protected mode) of the application that originated the system call.